//
//  DetailsCollectionViewCell.m
//  Comic
//
//  Created by 程锦 on 16/3/11.
//  Copyright © 2016年 程锦. All rights reserved.
//

#import "DetailsCollectionViewCell.h"

@implementation DetailsCollectionViewCell

- (void)awakeFromNib {
    // Initialization code
    
    _gradientLayer = [CAGradientLayer layer];  // 设置渐变效果
    _gradientLayer.bounds = _layerView.bounds;
    _gradientLayer.borderWidth = 0;
    
    _gradientLayer.frame = _layerView.bounds;
    _gradientLayer.colors = [NSArray arrayWithObjects:
                             (id)[[UIColor clearColor] CGColor],
                             (id)[[UIColor blackColor] CGColor],nil];
    _gradientLayer.startPoint = CGPointMake(0.5, 0.5);
    _gradientLayer.endPoint = CGPointMake(0.5, 1.0);
    
    [_layerView.layer insertSublayer:_gradientLayer atIndex:0];
    

}

@end
